package com.deepclassifieds.daas.api.jdbc.dialect;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Locale;

import com.deepclassifieds.daas.api.jdbc.name.TableName;
import com.deepclassifieds.daas.api.xsd.ColumnDef;
import com.deepclassifieds.daas.api.xsd.ColumnDefs;
import com.deepclassifieds.daas.api.xsd.Record;

public interface Dialect {
	
	Locale getLocale();
	
	String createTable(TableName tableName, ColumnDefs columnDefs);
	String alterTableAddColumn(TableName tableName, ColumnDef columnDef);
	
	Record toRecord(ResultSet rs) throws SQLException;	
	String resolveIdentityColumnName(TableName tableName, Connection conn) throws SQLException;
	
	boolean isCaseSensitive();
	
	public interface DaasColumnName {
		String DAAS_UID                    = "daas_uid";
		String DAAS_UUID                   = "daas_uuid";
		String DAAS_CREATION_DATE          = "daas_creation_date";
		String DAAS_LAST_MODIFICATION_DATE = "daas_last_modification_date";
		String DAAS_VERSION                = "daas_version";
	}
	
}
